
Partial Class autenticar
    Inherits System.Web.UI.Page
    Private objG As capaNegocios.Gestor = objG.instanciar()

    Protected Sub Login1_Authenticate(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.AuthenticateEventArgs) Handles Login1.Authenticate
        Dim user As String = Login1.UserName
        Dim pas As String = Login1.Password
        Dim ses As Boolean
        ses = objG.validar(user, pas)
        e.Authenticated = ses
        Session.Item("carnet") = user
    End Sub

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Me.Login1.Focus()
    End Sub

End Class
